package com.googlecode.droidjni;

public class droid {

    public static final String LOG_TAG;

    static {
/*      com.googlecode.droidjni.util.timestamp("loadLibrary"); */
        System.loadLibrary("dlib"); /* best time seen ~6116 microseconds */
/*      com.googlecode.droidjni.util.timestamp("loadLibrary"); */
        LOG_TAG = logTag();
    }

    private static native String logTag();

    /* empty function to measure java->c call performance ~219 nanosecond per call */
    public static native void nop();

    /* collection of performance tests:
       * timestamps 1,000,000 native calls (best time seen so far 14 nanoseconds)
       * ashmem_smoke_test
       * futex_smoke_test
       * mutex_smoke_test
       * sem_smoke_test
    */
    public static native void smokeTests();

    // test
    public static native int add(int x, int y);


}
